package com.example.entity.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.example.utils.*;
import com.example.enums.*;

import java.util.Date;
import java.io.Serializable;
/**
 * @Description:用户信息表
 * 
 * @Date:2024/07/12
 */
public class UserInfo implements Serializable {

	/**
	 * 用户id
	 */
	private String userId;

	/**
	 * 邮箱
	 */
	private String email;

	/**
	 * 昵称
	 */
	private String nickName;

	/**
	 * 0:直接添加好友，1：同意后添加
	 */
	private Integer joinType;

	/**
	 * 性别：0：女 1；男
	 */
	private Integer sex;

	/**
	 * 密码
	 */
	private String password;

	/**
	 * 个性签名
	 */
	private String personalSignature;

	/**
	 * 状态
	 */
	@JsonIgnore
	private Integer status;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 最后登录实时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastLoginTime;

	/**
	 * 地区
	 */
	private String areaName;

	/**
	 * 地区编号
	 */
	private String areaCode;

	/**
	 * 最后离线时间
	 */
	private Long lastOffTime;

	public String getUserId() {
		return userId;
	}
	public void  setUserId(String userId) {
		this.userId = userId;
	}
	public String getEmail() {
		return email;
	}
	public void  setEmail(String email) {
		this.email = email;
	}
	public String getNickName() {
		return nickName;
	}
	public void  setNickName(String nickName) {
		this.nickName = nickName;
	}
	public Integer getJoinType() {
		return joinType;
	}
	public void  setJoinType(Integer joinType) {
		this.joinType = joinType;
	}
	public Integer getSex() {
		return sex;
	}
	public void  setSex(Integer sex) {
		this.sex = sex;
	}
	public String getPassword() {
		return password;
	}
	public void  setPassword(String password) {
		this.password = password;
	}
	public String getPersonalSignature() {
		return personalSignature;
	}
	public void  setPersonalSignature(String personalSignature) {
		this.personalSignature = personalSignature;
	}
	public Integer getStatus() {
		return status;
	}
	public void  setStatus(Integer status) {
		this.status = status;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void  setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void  setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public String getAreaName() {
		return areaName;
	}
	public void  setAreaName(String areaName) {
		this.areaName = areaName;
	}
	public String getAreaCode() {
		return areaCode;
	}
	public void  setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
	public Long getLastOffTime() {
		return lastOffTime;
	}
	public void  setLastOffTime(Long lastOffTime) {
		this.lastOffTime = lastOffTime;
	}
	@Override
	public String toString() {
		return "用户id:"+(userId == null ? "空" : userId)+", 邮箱:"+(email == null ? "空" : email)+", 昵称:"+(nickName == null ? "空" : nickName)+", 0:直接添加好友，1：同意后添加:"+(joinType == null ? "空" : joinType)+", 性别：0：女 1；男:"+(sex == null ? "空" : sex)+", 密码:"+(password == null ? "空" : password)+", 个性签名:"+(personalSignature == null ? "空" : personalSignature)+", 状态:"+(status == null ? "空" : status)+", 创建时间:"+(createTime == null ? "空" : DateUtil.format(createTime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+", 最后登录实时间:"+(lastLoginTime == null ? "空" : DateUtil.format(lastLoginTime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+", 地区:"+(areaName == null ? "空" : areaName)+", 地区编号:"+(areaCode == null ? "空" : areaCode)+", 最后离线时间:"+(lastOffTime == null ? "空" : lastOffTime);
	}
}